<div class="content-section implementation GridDemo ">
  <div class="mysearch">
    <div class="ui-g">
      <div class="ui-g-7 ui-sm-12">
        <label class="ui-g-2 ui-sm-5 text-right" >巡检点名称:</label>
        <div class="ui-g-4  ui-sm-7 ui-fluid">
          <input pInputText type="text" name="sid" placeholder="巡检点名称" [(ngModel)]="queryModel.condition.name" />
        </div>
        <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">巡检点标签:</label>
        <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
          <input  pInputText type="text" name="status" placeholder="巡检点标签"   [(ngModel)]="queryModel.condition.flag" />
        </div>
      </div>

      <div class="ui-g-3 ui-sm-12">
        <div class="ui-g-4 ui-sm-12 option">
          <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
        </div>
      </div>
      <div class="ui-g-2 ui-sm-12">
        <div class="ui-g-12 ui-sm-12 option">
          <button pButton type="button" label="删除" ngClass="ui-sm-12" (click)="deleteMaterial()"  [disabled]="selectMaterial.length===0"></button>
          <button pButton type="button" label="新增" ngClass="ui-sm-12" (click)="showInspectionPointMask()" ></button>
        </div>
      </div>
    </div>
  </div>
  <div class="ui-g">
    <div class="ui-g-12">
      <p-dataTable [value]="MaterialData"
                   [totalRecords]="totalRecords"  [(selection)]="selectMaterial">
        <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button" label="编辑" (click)="updateOption(MaterialData[i])"></button>
            <button pButton type="button" label="关联巡检对象" (click)="showPointerMask(MaterialData[i])"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>
</div>
<app-add-inspection-point-configuration
*ngIf="showInspectionPoint"
(addDev)="addInsepection($event)"
[state]="state"
(updateDev)="updateInspectionContent($event)"
[currentInspection]="currentInpection"
(closeInspectionPoint)="closeInspectionPointMask($event)"
></app-add-inspection-point-configuration>
<app-point-associated
*ngIf="showPointer"
(closePointer)="closePointerMaks($event)"
></app-point-associated>
